.chat-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

.messages {
    height: 400px;
    overflow-y: auto;
    border: 1px solid #ccc;
    padding: 10px;
    margin-bottom: 20px;
}

.message {
    margin: 10px 0;
    padding: 10px;
    border-radius: 5px;
}

.message.user {
    background-color: #e3f2fd;
    margin-left: 20%;
}

.message.assistant {
    background-color: #f5f5f5;
    margin-right: 20%;
}

form {
    display: flex;
    gap: 10px;
}

input {
    flex: 1;
    padding: 8px;
}

button {
    padding: 8px 16px;
}

.loading-indicator {
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.typing-indicator {
  display: flex;
  gap: 4px;
}

.typing-indicator span {
  width: 8px;
  height: 8px;
  background: #666;
  border-radius: 50%;
  animation: bounce 1.5s infinite;
}

.typing-indicator span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

/* 添加语音按钮样式 */
.voice-btn {
    padding: 8px;
    color: #6b7280;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.voice-btn:hover:not(:disabled) {
    border-color: #10b981;
    color: #10b981;
}

.voice-btn.listening {
    background: #10b981;
    color: white;
    border-color: #10b981;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

/* 移动端适配 */
@media (max-width: 768px) {
    .voice-btn {
        padding: 6px;
    }
    
    .voice-btn svg {
        width: 18px;
        height: 18px;
    }
}